#include <pthread.h>
#include <stdio.h>
#include <time.h>

void* thread1(void) {
	int i;
	for (i = 0; i < 10; i++) {
		printf("this line i = %d\n", i);		
		sleep(1);	
	}
}

int main(int argc, void* argv[]) {
	pthread_t id;
	int ret = pthread_create(&id, NULL, (void*)thread1, NULL);
	if (ret) {
		printf("failed");
		return -1;	
	} 

	pthread_join(id, NULL);
}

